<layout name="layout" />
<div class="form-div">
    <form action="{:U('lst')}" name="searchForm">
    <img src="__PUBLIC__/Admin/Images/icon_search.gif" width="26" height="22" border="0" alt="search" />
    	商品分类:
    		<select name="cat_id">
             	<option value="0">请选择分类</option>
             	<foreach name="catData" item="v">
             		<option value="{$v.id}" <if condition="$v['id'] eq $_GET['cat_id']">selected="selected"</if>>
             			<php>echo str_repeat('-',$v['level']*8);</php>{$v.cat_name}
             		</option>
             	</foreach>
             </select>
    	商品名称:<input type="text" name="gn" size="15" value="{:I('get.gn')}"/>
    	商品价格:<input type="text" name="fp" value="{:I('get.fp')}"/>到<input type="text" name="tp" value="{:I('get.tp')}"/>
    	是否上架:<input type="radio" name="ios"   <if condition="I('get.ios') eq 0">checked="checked"</if>   value="0"/>全部
    		  <input type="radio" name="ios" <if condition="I('get.ios') eq '是'">checked="checked"</if> value="是"/>是
    		  <input type="radio" name="ios" <if condition="I('get.ios') eq '否'">checked="checked"</if> value="否"/>否
    <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>
<form method="post" action="" name="listForm">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>id</th>
                <th>logo</th>
                <th>商品名称</th>
                <th>市场价格</th>
                <th>本店价格</th>
                <th>是否上架</th>
                <th>操作</th>
            </tr>
            <foreach name="data" item="v" key="k">
	            <tr>
	                <td>{$v.id}</td>
	                <td align="center"><img src="{:C('IMG_ROOT')}{$v.sm_logo}" /></td>
	                <td align="center">{$v.goods_name}</td>
	                <td align="center">{$v.market_price}</td>
	                <td align="center">{$v.shop_price}</td>
	                <td align="center">{$v.is_on_sale}</td>
	                <td align="center">
	                <a href="{:U('edit',array('id'=>$v['id']))}" title="编辑">编辑</a> |
	                <a onclick="return confirm('确定要干掉？');" href="{:U('delete',array('id'=>$v['id']))}" title="干掉">干掉</a> 
	                </td>
	            </tr>
            </foreach>
            <tr>
                <td align="right" nowrap="true" colspan="6">
                    <div id="turn-page">
                    	{$page}
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form>

